/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>CreateTime: 2006-4-4 </p>
 * @author pengz
 * @version 1.0
 */

package cn.agiledata.bank.common.tag;

import java.util.List;

import javax.servlet.jsp.JspException;

import org.apache.struts.taglib.bean.WriteTag;

import cn.agiledata.bank.common.servlet.InitForString;

public class AgileWriteTag extends WriteTag {

	String typeid = null;


	public String formatValue(Object v)throws JspException{


		List listId =InitForString.getListId(typeid);
		List listName=InitForString.getListName(typeid);
		if (listName == null || listId==null)
			return null;
		for (int i = 0; i < listId.size(); i++) {

			if(listId.get(i).toString().equals(v.toString()))
				return super.formatValue(listName.get(i).toString());
			
		}
		return "";
			
	}


	public String getTypeid() {
		return typeid;
	}

	public void setTypeid(String typeid) {
		this.typeid = typeid;
	}



}
